package com.hong.spring.event;

import com.hong.spring.common.event.UserEventPublisher;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @Auther: csh
 * @Date: 2020/7/9 17:15
 * @Description:自定义事件
 */
public class UserEventTest {
    public static void main(String[] args) {
        ConfigurableApplicationContext context = new ClassPathXmlApplicationContext("event/applicationfile-event.xml");
        UserEventPublisher userEventPublisher = context.getBean("userEventPublisher", UserEventPublisher.class);
        userEventPublisher.publish();
        userEventPublisher.publish();
    }
}
